import java.util.Arrays;

/**
 * @ClassName LC1502
 * @Author ykx
 * @Date 2024/7/10 19:49
 * @Version 1.0
 */
public class LC1502 {
    public static void main(String[] args) {

    }

    public boolean canMakeArithmeticProgression(int[] arr) {
        Arrays.sort(arr);
        int d = arr[1] - arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] - arr[i - 1] != d) {
                return false;
            }
        }

        return true;
    }

}
